package org.jeecg.modules.flower.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.flower.entity.FlowerOutorder;
import org.jeecg.modules.flower.entity.FlowerOutorderinfo;
import org.jeecg.modules.flower.entity.Xsgl;

import java.io.IOException;
import java.math.BigDecimal;
import java.util.List;

/**
 * 销售管理相关逻辑接口
 *
 * @author gf
 * @create 2022-9-22 9:25
 */
public interface XsglService extends IService<FlowerOutorder> {


    /**
     * 获取客户信息，分页，并增量插入到客户数据库
     *
     * @return void
     * @descriptionauthor
     * @author gf
     * 2022-9-22 9:27
     * []
     */
    public Integer getXSGLUser() throws IOException;


    /**
     * 获取客户余额
     *
     * @return void
     * @descriptionauthor
     * @author gf
     * 2022-9-22 9:27
     * []
     */
    public BigDecimal getXSGLUserMoney(String userId) throws IOException;


    /**
     *
     * 推送订单信息（新建订单）
     * @descriptionauthor
     * @author gf
     * 2023-4-10 14:55
     * [xsgl]
     * @return java.lang.Integer
     */
    /*public Integer sendOrderInfo(String userId, BigDecimal outAmount, String outNo, Date outTime, Date settTime, BigDecimal settAmount, String isInvoice, String businessPersion,String outType) throws IOException;*/
    public Integer sendOrderInfo(Xsgl xsgl) throws IOException;

    /**
     * 订单确认出库
     *
     * @param userId
     * @param outNo
     * @return
     */
    public void orderConfirmOutStock(String userId, String outNo);

    /**
     * 取消订单(给用户退款)
     *
     * @param sealNo
     * @return
     */
    public void cancelOrder(String sealNo) throws IOException;

    /**
     * 获取token
     *
     * @return
     */
    public String getToken() throws IOException;


    /**
     * 发送已出库通知给销售系统。---新逻辑作废
     *
     * @return
     * @descriptionauthor
     * @author gf
     * 2023-2-16 18:18
     */
    void senOutNotice(String sealNo) throws IOException;

    /**
     *
     *发送实际出库数量给销售系统。
     * @descriptionauthor
     * @author gf
     * 2023-3-1 14:43
     * [orderNum销售系统单号, outNo出库单号, outers出库人, flowerOutorderinfo]
     * [success  如果为true 则修改订单为已发货  否则返还客户余额 订单失效
     * message   stirng   // succes为fasle时原因
     * @return void
     */
    void senOutOrderTnumbers(String orderNum,String outNo,String outers, boolean success ,String message,
                                      List<FlowerOutorderinfo> flowerOutorderinfoList)  ;    /**
     *
     *发送实际出库数量给销售系统。
     * @descriptionauthor
     * @author gf
     * 2023-3-1 14:43
     * [orderNum销售系统单号, outNo出库单号, outers出库人, flowerOutorderinfo]
     * [success  如果为true 则修改订单为已发货  否则返还客户余额 订单失效
     * message   stirng   // succes为fasle时原因
     * @return void
     */
    void sureOutBack(String orderNum) throws IOException;
}
